From 6fb906a1e5e8c39e9d09cdf9a52099f2bf997d08 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 17 Apr 2010 23:39:03 -0700 Subject: [PATCH] Always regenerate autofiles (drop autofiles-sync); set debian/compat to 7. * Follow current autotools-dev recommendations - build-depend on autoconf, remove the automatically generated files in clean, and regenerate them before building. * Update debian/compat from 4 to 7. --- debian/changelog | 8 ++++- debian/compat | 2 +- debian/control | 2 +- debian/control.in | 2 +- debian/patches/series | 1 - debian/rules | 80 ++++++++----------------------------------- 6 files changed, 24 insertions(+), 71 deletions(-) diff --git a/debian/changelog b/debian/changelog index 11951507f4e..0e7dcbe1ef0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,13 @@ emacs23 (23.1+1-7) unstable; urgency=low * Support DEB_BUILD_OPTIONS parallel=N. - -- Rob Browning Sat, 17 Apr 2010 23:37:04 -0700 + * Follow current autotools-dev recommendations - build-depend on + autoconf, remove the automatically generated files in clean, and + regenerate them before building. + + * Update debian/compat from 4 to 7. + + -- Rob Browning Sat, 17 Apr 2010 23:38:10 -0700 emacs23 (23.1+1-6) unstable; urgency=low diff --git a/debian/compat b/debian/compat index b8626c4cff2..7f8f011eb73 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -4 +7 diff --git a/debian/control b/debian/control index 47ac98ac320..58953dafe82 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: emacs23 Section: editors Priority: optional Maintainer: Rob Browning -Build-Depends: mailx, libncurses5-dev, texinfo, liblockfile-dev, librsvg2-dev, libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libm17n-dev, libotf-dev, libgpm-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdbus-1-dev, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42-1), debhelper (>= 4), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] +Build-Depends: mailx, libncurses5-dev, texinfo, liblockfile-dev, librsvg2-dev, libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libm17n-dev, libotf-dev, libgpm-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdbus-1-dev, autoconf, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42-1), debhelper (>= 4), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] Standards-Version: 3.7.2 Package: emacs diff --git a/debian/control.in b/debian/control.in index 06fe6f30ea8..c0b3878efcd 100644 --- a/debian/control.in +++ b/debian/control.in @@ -2,7 +2,7 @@ Source: @DEB_FLAVOR@ Section: editors Priority: optional Maintainer: Rob Browning -Build-Depends: mailx, libncurses5-dev, texinfo, liblockfile-dev, librsvg2-dev, libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libm17n-dev, libotf-dev, libgpm-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdbus-1-dev, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42-1), debhelper (>= 4), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] +Build-Depends: mailx, libncurses5-dev, texinfo, liblockfile-dev, librsvg2-dev, libgif-dev | libungif4-dev, libtiff4-dev | libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libm17n-dev, libotf-dev, libgpm-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdbus-1-dev, autoconf, autotools-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42-1), debhelper (>= 4), libxaw7-dev, sharutils, imagemagick, libgtk2.0-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] Standards-Version: 3.7.2 Package: emacs diff --git a/debian/patches/series b/debian/patches/series index 849a262fdaf..8864013b4f0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,4 +12,3 @@ fix-rmail-capitalized-month-names.diff fix-dynamic-menus.diff fix-gtk-scroll-bar-events.diff use-zwj-and-zwnj-for-indic-scripts.diff -autofiles.diff diff --git a/debian/rules b/debian/rules index 9f6f68c7fae..09b3ed38d16 100755 --- a/debian/rules +++ b/debian/rules @@ -71,13 +71,6 @@ pf := set -o pipefail # we'll need to be careful. We'll probably have to build completely # separate packages from completely separate source trees. -# In order to keep the autofiles up to date, but avoid any alterations -# outside of ./debian, we keep the changes made by running a new -# autoconf, etc. in patches/autofiles.diff. This patch can be -# automatically regenerated by running "debian/rules autofiles-sync", -# and this patch should always be maintained as the last one in the -# patch series. - # Note that we use quilt to handle the debian patches. One of the # biggest differences between quilt and say dpatch is that you have to # explicitly "quilt add" a file to a patch before you edit it. See @@ -99,7 +92,6 @@ pf := set -o pipefail # check-vars - displays how the version number has been parsed. # buildpackage - build binary packages via dpkg-buildpackage w/suitable args # prepare-release - prepare and check debs for upload. -# autofiles-sync - force a new autofiles.diff to be generated. # ###################################################################### @@ -166,7 +158,13 @@ export DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) # Handle cross-compiling and don't make ./configure guess. export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) + +# FOR AUTOCONF 2.52 AND NEWER ONLY +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build $(DEB_HOST_GNU_TYPE) +else + confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif LDFLAGS := -g CFLAGS := -DDEBIAN -g @@ -195,8 +193,6 @@ movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail # Wonder if we could patch emacs to copy/use these files to/from the # build tree... (See Makefile.in's AUTOGENEL definition.) protected_files := \ - config.guess \ - config.sub \ lisp/cus-load.el \ lisp/finder-inf.el \ lisp/loaddefs.el \ @@ -282,15 +278,6 @@ define checkroot endef define checkdir - @if ! test -s debian/patches/autofiles.diff; \ - then \ - echo; \ - echo "The Debian autofiles patch is not available."; \ - echo "Please run this command:"; \ - echo " debian/rules autofiles-sync"; \ - echo; \ - false; \ - fi dpkg-parsechangelog > /dev/null dh_testdir debian/emacsVER.postinst @if ! test -f src/emacs.c; \ @@ -337,6 +324,8 @@ define cleanup_all rm -f debian/stamp/setup rm -f debian/stamp/configure rm -f debian/stamp/build + rm -f configure src/config.in + dh_autotools-dev_restoreconfig -$(MAKE) distclean cd info && rm -f $$(ls | grep -v COPYING | grep -v '^dir$$') dh_clean @@ -365,34 +354,6 @@ define cleanup_all test ! -e debian/stamp || rmdir debian/stamp endef -define update_debian_autofiles_quilt - $(cleanup_all) - # Make sure autofiles.diff exists, otherwise patching will fail. - if ! test -e debian/patches/autofiles.diff; \ - then \ - touch debian/patches/autofiles.diff; \ - fi; - $(quilt) push $$($(quilt) series | tail -n 2 | head -n 1) - test "$$($(quilt) next)" = autofiles.diff - $(quilt) pop - mkdir -p debian/tmp-autofiles/old - $(pf); tar cpSf - --exclude ./debian --exclude ./.pc . \ - | tar -C debian/tmp-autofiles/old -xpSf - - cp -a debian/tmp-autofiles/old debian/tmp-autofiles/new - cd debian/tmp-autofiles/new && aclocal - cd debian/tmp-autofiles/new && autoconf - cd debian/tmp-autofiles/new && autoheader - cd debian/tmp-autofiles/new && rm -rf autom4te.cache - cd debian/tmp-autofiles && diff -ruN old new > new.diff; \ - test $$? -eq 1 - $(quilt) import -f -P autofiles.diff debian/tmp-autofiles/new.diff - $(quilt) header -r autofiles.diff < debian/autofiles-diff-header - $(patch) - $(quilt) refresh --no-timestamps autofiles.diff - $(cleanup_all) -endef -deb_trash += debian/tmp-autofiles - # If we ever need it, we can create a copy that doesn't assume ./debian/ define deb_sub perl -p \ @@ -452,13 +413,12 @@ check-diff: clean cd .. && dpkg-source -b -i'\.git|\.pc' "$(basename $(CURDIR))" $(check_diff) +.PHONY: buildpackage buildpackage: $(checkdir) dpkg-buildpackage -D -us -uc -rfakeroot -i'\.git|\.pc' $(check_diff) -.PHONY: buildpackage - prepare-release: $(checkdir) # don't want to be root -- using fakeroot below. @@ -477,13 +437,6 @@ prepare-release: fi # TODO: make sure we actually installed the binary. # TODO: run tests (use a check target?) - @read -p "Regenerate autofiles.diff? [y/n] "; \ - if test "$${REPLY}" == y; \ - then \ - $(MAKE) -f debian/rules autofiles-sync; \ - else \ - true; \ - fi $(MAKE) -f debian/rules clean $(MAKE) -f debian/rules buildpackage test -f ../$(src_name)_$(debian_ver).diff.gz @@ -502,13 +455,6 @@ prepare-release: .PHONY: prepare-release -# we don't sync this automatically on clean because it's expensive and -# should only be done by a maintainer with time to deal with any mess -# it might create. -autofiles-sync: - $(update_debian_autofiles_quilt) -.PHONY: autofiles-sync - debian-sync: $(persistent_autogen_files) .PHONY: force-debian-sync debian-sync @@ -574,8 +520,10 @@ debian/stamp/patch: debian/protected-files.tgz debian/stamp/setup: debian/stamp/patch $(checkdir) - cp /usr/share/misc/config.sub . - cp /usr/share/misc/config.guess . + dh_autotools-dev_updateconfig + aclocal + autoconf + autoheader mkdir -p $(dir $@) && touch $@ # common configure flags -- 2.30.2